package com.jhgk.jhcee.system.service;

import com.jhgk.jhcee.common.resultful.BasisResultful;
import com.jhgk.jhcee.system.domain.model.SysMenuInfoModel;
import com.jhgk.jhcee.system.domain.model.SysMenuMetaRelationModel;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Description:
 * @Author: lemon_xzp
 * @Date: 2021/9/22 10:58
 */
public interface SysMenuInfoService {

    BasisResultful<Object> getMenuList();

    BasisResultful<Object> getMenuPage(Integer page,Integer pageSize);

    BasisResultful<Object> getMenuMetaAllList(SysMenuInfoModel model);

    @Transactional
    BasisResultful<Object> addMenu(SysMenuMetaRelationModel model);

    @Transactional
    BasisResultful<Object> updateMenu(SysMenuMetaRelationModel model);

    BasisResultful<Object> deleteMenu(SysMenuInfoModel model);

    BasisResultful<Object> getMenuMetaAll();

    List<Long> getRoleMenu(Long roleId);

    @Transactional
    boolean saveRoleMenu(Long roleId,List<Long> menuIds);

    /**
     * 刷新缓存菜单
     */
    boolean renewMenuCache();
}
